<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>条件渲染</title>
    <script src="https://unpkg.com/vue@3"></script>
</head>
<body>
    <div id="app">
        <h1 v-if="show">标题</h1>
        <p v-else>如果不显示标题就显示段落</p>
    </div>
</body>
<script>
    const App = Vue.createApp({
        data() {
            return {
                show: false
            }
        }
    })
    App.mount('#app')
</script>
</html>
